package com.guohui.boot1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

@SpringBootApplication
@EnableCaching
@EnableDiscoveryClient
@EnableFeignClients
@EnableCircuitBreaker
public class Boot1Application {
  
  @Autowired
  DiscoveryClient client;

	public static void main(String[] args) {
		SpringApplication.run(Boot1Application.class, args);
	}
	
	public void execute() {
	  client.getLocalServiceInstance();
	}
}
